Chapter 12. How GrafEq Works

The general GrafEq environment is that relations are entered in algebraic windows, and plotted in view windows. Then relations and views can be prepared for printing in page windows.

GrafEq also has many features of interest to the sophisticated user, including its relation parser, plotting technique, and memory management.
Hint:Useful and interesting hints and tips relevant to the immediate topic are offered throughout this GrafEq manual. Most chapters are also concluded with general hints and tips for the chapter topic. Hints are observations that often helps understanding; Tips are possible actions that often helps efficiency or effectiveness. They might simply be interesting side notes too.

The Algebraic Relation Parser
GrafEq’s algebraic relation parser understands conventional mathematics notation, which helps make the program intuitive to those familiar with such notation, and encourages students to learn the standard notation. Some characteristics are explained as follows:

Tip:Older versions of GrafEq perform little symbolic manipulation, and plotting is primarily numeric. Natural pre-processing of expressions such as replacing “x3 - x3” with a simple “0” might enhance efficiency significantly. Starting with version 2.04, GrafEq does simple pre-processing, so that it will recognize (and perform) simple replacements that improve graphing speed without changing the graph of the relation.

Rewriting and simplifying relations must be done very carefully! For example, “>=!” should not be re-written as “<” because they are not equivalent in all cases. Figure 12.1 shows the graphs of “y >=! Arccosx” and “y < Arccosx” as plotted by GrafEq; they are not equal because Arccosx is undefined for x>1 and x<-1:

Graph of y >=! Arccosx Graph of y < Arccosx
Graph of y >=! Arccosx Graph of y < Arccosx

Figure 12.1: Graphs plotted by GrafEq shows that “>=!” and “<” are not the same

The Plotting Technique - Successive Refinement
GrafEq’s graphing engine uses a unique plotting technique called successive refinement, which ensures that irregular graphs are plotted correctly. Details are explained as follows:

  1. A view region is divided into rectangular sub-regions.
  2. Each sub-region is examined:
    Hint:A graph is drawn using the following rules:
    • pixels that form part of the final graph have the (possibly blended) colours of the relevant relations;
    • pixels that do not form part of the final graph have the colour of the view region’s background; and
    • pixels that are not yet determined
      • have the (possibly blended) colours of the relevant relations, or
      • if the Show Work option, in the information view buddy, is selected, the colour of the work area.
Hint:GrafEq can correctly plot irregular graphs such as singularities and narrowly spiked curves. Figure 12.2 shows three stages in the plotting of “x(x+1)2+y(y+1)2=0”:

Graph of x(x+1)^2+y(y+1)^2=0 Graph of x(x+1)^2+y(y+1)^2=0 Graph of x(x+1)^2+y(y+1)^2=0

Figure 12.2: GrafEq plotting a relation with a singularity, in successive refinement
Tip:Graphing can be sped up if relations can be described as inequalities naturally. Inequalities are typically done more efficiently than equations.
Hint:GrafEq displays a “signature” at point-discontinuities.

Consider the relation y=(x-1)(x+1)/(x-1). Its graph can be anticipated to be the line y=x+1 less the point (1,2). However, when the relation is fed to a computer, while graphers using common sampling plotting techniques would likely miss the issue of the point discontinuity altogether, even GrafEq with its robust graphing engine cannot omit any pixels for the point (1,2), because the pixel containing (1,2) also contain many solutions in the real number continuum that satisfy the relation. In such cases, rather than just graphing the solid line y=x+1, GrafEq will often make the anomaly apparent, by displaying a signature at the point-discontinuity, as shown in figure 12.3:

Graph of y=(x-1)(x+1)/(x+1) Graph of y=(x-1)(x+1)/(x+1) Graph of y=(x-1)(x+1)/(x+1)

Figure 12.3: Graph with point discontinuity signature at x=1

Starting with version 2.04, GrafEq has an improved graphing engine which may not display discontinuity signatures (older versions may not either; the signature is a side-effect of the graphing process). Future versions will have added features, which will allow users to see undefined portions of a graph.

Tip:To achieve high precision, the view scope can be enlarged by setting large bounds from the create view dialog box. High precision is useful for printing very thin accurate curves via a high resolution printer. In general, a 600 to 2,450 dpi printer will generate good results with uniform ticks.

Memory and Speed
GrafEq provides a memory monitor to display information on memory usage. When the memory monitor shows that memory resources are becoming inadequate, the following actions might help:

More memory usage information is also provided in the Information View Buddy, including: Actions that relieve memory inadequacy generally help graph plotting speed too, while the following steps mainly enhances the latter.
Tip:Any computationally intensive program will run more efficiently on a fast machine with generous memory resources. For specific information on how a computer system manages memory, refer to documentations for its hardware, operating system and other softwares installed. With respect to GrafEq:

If computer time is restricted, such as access to machines is limited to one-hour time slots, GrafEq can still be used effectively to plot complicated graphs at high resolutions. At the end of a session, select halt graphing from the File menu, and save the graph in full format. The full graph can be opened at a later time and graphing can resume from where it left off previously.

If disk resources is too scarce for saving a full graph, a graph of interest can usually still be saved in the skeleton format. The skeleton graph can be opened at a later time, although the plotting process must then re-start from scratch.

Further Reading
For more information on how the graphing process works, see:

Jeffrey Allen Tupper. Graphing Equations with Generalized Interval Arithmetic.
M.Sc. Thesis, Department of Computer Science, University of Toronto, January 1996.
http://www.dgp.toronto.edu/people/mooncake/msc.html

Navigation Options
jump up to theTable of Contents

go back to Preferences
review How GrafEq Works
continue on to Easy Buttons
send us email